package ${ftl.packageName}.${cgH.moduleName};
<#assign en =0 />
<#assign dto =8 />
<#assign command =9 />
import ${mList[en].packageName}.${cgH.moduleName}.${tc.entityName}${mList[en].classPostfix};
import ${mList[dto].packageName}.${cgH.moduleName}.${tc.entityName}${mList[dto].classPostfix};
import ${mList[command].packageName}.${cgH.moduleName}.${tc.entityName}${mList[command].classPostfix};
import com.stars.common.ObjectCopyUtils;
import com.stars.common.base.BaseConstant;
/**
 * @Title: ${tc.tableComment} 业务逻辑
 * @author dj
 * @date ${tc.createTime}
 * @version V1.0
 *
 */
public class ${tc.entityName}${tc.entityPostfix}{

    public static ${tc.entityName}${mList[en].classPostfix} toAdd${tc.entityName}(${tc.entityName}${mList[command].classPostfix} command) {
        ${tc.entityName}${mList[en].classPostfix} entity = new ${tc.entityName}${mList[en].classPostfix}();
        ObjectCopyUtils.copyPropertiesIf(command,entity, BaseConstant.EXCLUDES);
        return entity;
    }

    public static ${tc.entityName}${mList[en].classPostfix} toUpdate${tc.entityName}(${tc.entityName}${mList[command].classPostfix} command) {
        ${tc.entityName}${mList[en].classPostfix} entity = new ${tc.entityName}${mList[en].classPostfix}();
        ObjectCopyUtils.copyPropertiesIf(command,entity);
        return entity;

    }

    public static ${tc.entityName}${mList[dto].classPostfix} toFindById(${tc.entityName}${mList[dto].classPostfix} entity){
        ${tc.entityName}${mList[dto].classPostfix} dto = new ${tc.entityName}${mList[dto].classPostfix}();
        ObjectCopyUtils.copyPropertiesIf(entity,dto);
        return dto;
    }
}